import { Entity } from "../../../../../Core/Module/Entity/Entity";
import { IAwake } from "../../../../../Core/Module/EventSystem/IAwakeSystem";
import { IDestroy } from "../../../../../Core/Module/EventSystem/IDestroySystem";
import { ImplementsInterface } from "../../../../../Decorator/Decorator";
import { List } from "../../../../../Support/Share/Lib/Collections/List";
import { SortedDictionary } from "../../../../../Support/Share/Lib/SortedDictionary";
import { ActorMessageSender } from "./ActorMessageSender";

@ImplementsInterface(IAwake)
@ImplementsInterface(IDestroy)
export class ActorMessageSenderComponent extends Entity implements IAwake, IDestroy {

    public static readonly TIMEOUT_TIME: number = 40 * 1000;

    public static Instance: ActorMessageSenderComponent;

    public RpcId: number = 0;

    public readonly requestCallback: SortedDictionary<number, ActorMessageSender> = new SortedDictionary<number, ActorMessageSender>();

    public TimeoutCheckTimer: number;

    public TimeoutActorMessageSenders: List<number> = new List<number>();

}